#自定义过滤器
#字段截取
from django.template import Library
register = Library()
@register.filter
def md(value):
    import markdown

@register.filter
def splitst(value,agery):
    start,end = agery.split(',') #，分割
    value = value.encode('utf-8').decode('utf-8')
    return value[int(start):int(end)] #切片